home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / src / binutils.252 / ld / configur.in < prev    next >
Encoding:
Text File  |  1994-10-21  |  5.4 KB  |  179 lines

  1. # This file is a shell script fragment that supplies the information
  2. # necessary to tailor a template configure script into the configure
  3. # script appropriate for this directory.  For more information, check
  4. # any existing configure script.
  5.  
  6. srctrigger=ldmain.c
  7. srcname="linker"
  8. target_dependent=true
  9.  
  10. # per-host:
  11.  
  12. . ${srcdir}/../bfd/configure.host
  13.  
  14. host_makefile_frag=
  15.  
  16. if [ -f ${srcdir}/config/${my_host}.mh ] ; then
  17.     host_makefile_frag=config/${my_host}.mh
  18. fi
  19.  
  20. # per-target:
  21.  
  22. # Canonicalize the secondary target names.
  23. if [ -n "$enable_targets" ]; then
  24.     for targ in `echo $enable_targets | sed 's/,/ /g'`
  25.     do
  26.     result=`$configsub $targ 2>/dev/null`
  27.     if [ -n "$result" ]; then
  28.         canon_targets="$canon_targets $result"
  29.     else
  30.         # Allow targets that config.sub doesn't recognize, like "all".
  31.         canon_targets="$canon_targets $targ"
  32.     fi
  33.     done
  34. fi
  35.  
  36. all_targets=false
  37.  
  38. for targ in $target $canon_targets
  39. do
  40.  
  41. case "${targ}" in
  42.  
  43.   sparc-sun-sunos4*)     ld_target=sun4 ;;
  44.   sparclite*-*-coff)    ld_target=coff-sparc ;;
  45.   sparclite*-fujitsu-*) ld_target=sun4 ;;
  46.   sparc*-*-aout)    ld_target=sun4 ;;
  47.   sparc*-*-coff)    ld_target=coff-sparc ;;
  48.   sparc64-*-elf*)    ld_target=sparc64-elf ;;
  49.   sparc64*)        ld_target=sun4 ;;
  50.   sparc*-*-elf)        ld_target=sun4sol2 ;;
  51.   sparc*-*-lynxos*)    ld_target=sparc-lynx ;;
  52.   sparc*-*-solaris2*)    ld_target=sun4sol2 ;;
  53.   sparc*-wrs-vxworks*)  ld_target=sun4 ;;
  54.   sparc*-*-netware)    ld_target=sun4sol2 ;;
  55.   i960-wrs-vxworks5.0*) ld_target=i960 ;;
  56.   i960-wrs-vxworks5*)   ld_target=i960coff ;;
  57.   i960-wrs-vxworks*)    ld_target=i960 ;;
  58.   i960-*-coff)        ld_target=i960coff ;;
  59.   i960-intel-nindy)    ld_target=i960 ;;
  60.   m68*-sun-sunos[34]*)    ld_target=sun3 ;;
  61.   m68*-wrs-vxworks*)    ld_target=vxworks68 ;;
  62.   m68*-ericsson-ose)    ld_target=ose68 ;;
  63.   *-tandem-none)    ld_target=st2000 ;; # FIXME needs better name
  64.   i[345]86-*-vsta)    ld_target=vsta ;;
  65.   i[345]86-*-go32)    ld_target=i386-go32 ;;
  66.   i[345]86-*-aix*)    ld_target=i386-coff ;;
  67.   i[345]86-*-sco*)    ld_target=i386-coff ;;
  68.   i[345]86-*-lynxos*)    ld_target=i386-lynx ;;
  69.   i[345]86-*-coff)    ld_target=i386-coff ;;
  70.   i[345]86-*-bsd)    ld_target=i386-bsd ;;
  71.   i[345]86-*-bsd386)    ld_target=i386-bsd ;;
  72.   i[345]86-*-bsdi*)    ld_target=i386-bsd ;;
  73.   i[345]86-*-aout)    ld_target=i386-aout ;;
  74.   i[345]86-*-linux*)    ld_target=i386-linux ;;
  75.   i[345]86-*-sysv4*)    ld_target=i386-elf ;;
  76.   i[345]86-*-unixware)    ld_target=i386-elf ;;
  77.   i[345]86-*-netware)    ld_target=i386-elf ;;
  78.   i[345]86-*-elf*)    ld_target=i386-elf ;;
  79.   i[345]86-*-sysv*)    ld_target=i386-coff ;;
  80.   i[345]86-*-mach*)    ld_target=i386-mach ;;
  81.   i[345]86-*-gnu*)    ld_target=i386-mach ;;
  82.   m8*-*-*)        ld_target=m88k-bcs ;;
  83.   a29k-*-udi)        ld_target=sa29200 ;;
  84.   a29k-*-ebmon)        ld_target=ebmon29k ;;
  85.   a29k-*-*)        ld_target=coff-a29k ;;
  86. #  arm-*-riscix*)    ld_target=riscix ;;
  87.   h8300-*-hms)        ld_target=coff-h8300 ;;
  88.   h8300h-*-hms)        ld_target=cf-h8300h ;;
  89.   h8500-*-hms)        ld_target=coff-h8500 ;;
  90.   sh-*-*)        ld_target=coff-sh ;;
  91.   m68k-sony-*)        ld_target=news ;;
  92.   m68k-hp-bsd*)        ld_target=hp300bsd ;;
  93.   m68*-*-aout)        ld_target=m68k ;;
  94.   m68*-*-coff)        ld_target=m68k-coff ;;
  95.   m68*-*-hpux*)        ld_target=hp300hpux ;;
  96.   m68*-*-lynxos*)    ld_target=m68k-lynx ;;
  97.   m68*-*-*)
  98.     echo '***' "Unknown m68k target vendor for ld:" ${target_vendor} 1>&2
  99.             exit 1 ;;
  100.   hppa*-*-*elf*)    ld_target=hppaelf ;;
  101.   vax-dec-ultrix* | vax-dec-bsd*) ld_target=vax ;;
  102.   mips*-dec-ultrix*)    ld_target=mips-lit ;;
  103.   mips*-sgi-irix5*)    ld_target=mipsb-elf32 ;;
  104.   mips*-sgi-irix*)    ld_target=mips-big ;;
  105.   mips*el-idt-ecoff*)    ld_target=mipsl-idt ;;
  106.   mips*-idt-ecoff*)    ld_target=mips-idt ;;
  107.   mips*-dec-bsd*)    ld_target=mipsbsd ;;
  108.   mips*el-*-elf*)    ld_target=mipsl-elf32 ;;
  109.   mips*-*-elf*)        ld_target=mipsb-elf32 ;;
  110.   alpha-*-osf*)        ld_target=alpha ;;
  111.   alpha-*-netware*)    ld_target=alpha ;;
  112.   z8k-*-sim | z8k-*-coff) ld_target=z8ksim ;;
  113.   ns32k-pc532-mach)    ld_target=pc532mach ;;
  114.   ns32k-pc532-netbsd*)  ld_target=netbsd532 ;;
  115.   powerpc-*-elf*)    ld_target=ppc-elf32 ;;
  116.   powerpc-*-netware*)    ld_target=ppc-elf32 ;;
  117.   *-*-aout)        ld_target=${target_cpu}-${target_vendor} ;;
  118.   *-*-coff)        ld_target=${target_cpu}-${target_vendor} ;;
  119.   *-*-netware)        ld_target=${target_cpu}-elf ;;
  120.  
  121.   all)            ld_target=all ;;
  122. esac
  123.  
  124.     if [ "x$ld_target" = "xall" ]; then
  125.         all_targets=true
  126.     else
  127.     if [ ! -f ${srcdir}/config/${ld_target}.mt ] ; then
  128.         echo '***' No file ${srcdir}/config/${ld_target}.mt 1>&2
  129.         echo '***' GNU LD does not support target ${ld_target} 1>&2
  130.         echo '***' Look in ld/configure.in for supported targets 1>&2
  131.         exit 1
  132.     fi
  133.  
  134.     if [ "x$targ" = "x$target" ]; then
  135.         target_makefile_frag=${srcdir}/config/${ld_target}.mt
  136.     else
  137.         target_extra_frags="$target_extra_frags ${srcdir}/config/${ld_target}.mt"
  138.     fi
  139.     fi
  140. done
  141.  
  142. # We don't do any links based on the target system, just makefile config.
  143.  
  144. # post-target:
  145.  
  146. rm -f Makefile.tmp Makefile.2
  147. mv Makefile Makefile.tmp
  148.  
  149. if [ x${all_targets} = xfalse ]; then
  150.  
  151.     allfrags="$target_makefile_frag $target_extra_frags"
  152.  
  153.     # The emulations in all the configured targets.
  154.     tb=`sed -n '
  155.     s/EMUL[     ]*=[     ]*\([^     ]*\)/e\1.o/p
  156.     s/EMUL_EXTRA.*=[     ]*\([^     ]*\)/e\1.o/p
  157.     ' $allfrags`
  158.     # uniq the list.
  159.     f=""
  160.     for i in $tb ; do
  161.     case " $f " in
  162.     *" $i "*) ;;
  163.     *) f="$f $i" ;;
  164.     esac
  165.     done
  166.     tb="$f"
  167.  
  168.     echo "EMULATION_OFILES = $tb" >> Makefile.2
  169.  
  170. else    # all_targets is true
  171.     echo 'EMULATION_OFILES = $(ALL_EMULATIONS)' >> Makefile.2
  172. fi    # all_targets is true
  173.  
  174. cat Makefile.tmp >> Makefile.2
  175. rm -f Makefile.tmp
  176. mv Makefile.2 Makefile
  177.  
  178. mkdir ldscripts 2>/dev/null
  179.